{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "4d8f820c-33ba-4187-b512-2e1ad83ddf8d",
   "metadata": {},
   "outputs": [],
   "source": [
    "import random\n",
    "random.seed(0x1010)  \n",
    "s=\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890! @#$%^&*\"\n",
    "ls=[]\n",
    "excludes=\" \"\n",
    "while len(ls)< 10:\n",
    "    pwd=\" \"\n",
    "    for i in range(10):\n",
    "        pwd+=s[random.randint(0,len(s)-1)]\n",
    "        if pwd[0] in excludes:\n",
    "           continue\n",
    "    ls.append(pwd)\n",
    "    excludes+= pwd[0]\n",
    "fo=open(\"随机密码.txt\",\"w\")\n",
    "fo.write(\"\\n\".join(ls))\n",
    "fo.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c0521a91-4123-401d-a3c0-a1eabd993b3e",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b3b5605a-d65e-442c-8c5d-4254851bf661",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
